package com.ytjj.qmyx.supplychain.mapper;

import com.ytjj.qmyx.supplychain.common.model.request.ExpressOrderRequest;
import com.ytjj.qmyx.supplychain.mapper.entity.YxBankerOrder;
import com.ytjj.qmyx.supplychain.mapper.entity.YxExpressOrders;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

public interface ExpressOrdersMapper extends Mapper<YxExpressOrders> {

    List<YxExpressOrders> queryExpressOrdersList(ExpressOrderRequest request);

    /**
     * 根据时间区间查询超过半小时未更新且未签收的快递单
     */
    List<YxExpressOrders> getExpressOrdersByIntervals(Integer startDay, Integer endDay, Date updateTime);

    /**
     * 查询指定日期的签收订单
     */
    List<YxExpressOrders> getExpressForCheckByTime(Integer startInterval,Integer endInterval,Date updateTime);

    /**
     * 获取未被绑定的快递
     */
    List<YxExpressOrders> getExpressUnbound();

    /**
     * 批量设置快递单无效
     */
    Integer updateInvalidFlagById(@Param("ids") List<Integer> ids);


    /**
     * 更新快递的订阅状态
     */
    Integer updateSubscribeStatusByExpress(String companyNo, String expressEno,String signMark);
}
